package obj.day3.test2;

import java.util.Random;

/**
 * @author げっしょく
 * @date 2021/7/18
 */
public class Test2 {
    public static void main(String[] args) {
        userandm(new ran() {
            @Override
            public int randm() {
                Random r = new Random();
                int a = r.nextInt(10000);
                return a;
            }
        });
        userandm(() -> {Random a = new Random();
        int c = a.nextInt(10);
        return c;});
    }
    public static void userandm(ran ra){
        int result = ra.randm();
        System.out.println(result);
    }
}
interface ran{
    int randm();
}